import http, {HttpOptions} from "../http";
// 响应接口
export interface GetFamilyByIdRes {
    code: number;
    msg: string;
    data: Record<string, unknown>;
    timestamp: number;
    now: string;
}

/**
 * 获取家庭
 * @param {string} id
 * @returns
 */
export function getFamilyById(id: number): Promise<GetFamilyByIdRes> {
    const config:HttpOptions  = {
        msg: false,
        token: true,
        load: false,
    }
    return http.get(`/family/${id}`, config);
}